Calculating Transformation Parameters For Image Processing

ABSTRACT

The invention relates to a method for obtaining transformation parameters. A camera motion can be modeled by providing a vector field of motion vectors describing estimated motion vectors, projecting the vector field on at least one axis, and deriving the transformation vector parameters from the projection of the vector fields. As the camera motion can be modeled by way of translation, scale and rotation, the projections of the vector field on the axis can be used.

The invention relates in general to a method for obtaining transformation parameters.

The invention further relates to a computer program and a computer program product for obtaining transformation parameters. Further, the invention relates to a device for obtaining transformation parameters, and the use of a method for obtaining motion vector transformation parameters in video compression systems.

Motion estimation is important in many fields of image processing. For example, during video compression, it is necessary to predict the pixel values in consecutive video frames. The prediction allows calculating the pixel values in the receiver without transmitting these through a transmission channel. The goal of prediction is that the overall difference with the actual pixel values is minimized, to allow the receiver to calculate a best possible image. With a minimized overall difference in the predicted pixel values, a significantly reduced amount of data has to be coded and transmitted for the reconstruction of the original frame.

The image data comprises predicted values by means of vector fields and the error or residue. The amount of residue depends on the accuracy of the vector field. The vector field is a description of a motion model of the pixel values.

Obtaining a vector field is described in de Haan, Biezen, “Sub-pixel motion estimation with 3-D recursive search block-matching”, Signal Processing: Image Communications 6, 1994, pp. 229-239.

However, obtaining transformation parameters from the vector fields is expensive in terms of computational effort.

Therefore, it is one object of the invention to provide obtaining transformation parameters with reduced computational effort. Another object of the invention is to provide an optimized motion model for motion prediction. A further object of the invention is to provide an improved compression of images.

These and other objects of the invention are solved by a method for obtaining transformation parameters from a vector field with projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.

For example, a vector field describing estimated motion vectors in an image, in particular in a video image, may be obtained using a common motion prediction method. The transformation parameters, for example, translation, scale, and rotation, can be obtained by projecting the vector field on at least one axis. The vector field can be comprised of vectors. The vectors can be composed of at least two components, for example, an x-component and a y-component. The x-component can be perpendicular to the y-component. The vector field can be described within a coordination system, with corresponding axes. One axis can be the x-axis, and the other axis can be the y-axis. Other coordination systems are as well possible. The transformation parameters can describe motion model parameters. The transformation parameters can be used to generate vector fields. The transformation parameters can be easily obtained, when the vector field is projected onto at least one of the axes, preferably on both axes. In particular, when projecting the vectors within the vector fields on each of the axis within the coordination system, and using all derived functions, the transformation parameters can be obtained easily.

The vectors can be comprised of at least two components, one for each axis. Each of the components can be parallel to one of the axes of the coordination system. Then, the projection onto the axes allows obtaining the respective components of the vectors within the vector field.

By projecting the vector field onto at least one axis, the transformation parameters can be isolated. For example, the scale parameter, the translation parameter, and the rotation parameter can be isolated using the projection. Within these projections multiplier values, and mean values can be obtained, which can be used to calculate the gain, e.g. scale parameter, or rotation parameter, and/or the off-set, e.g. translation parameter, correspondingly.

For example, in applications, it may be easier to handle motion model parameters, e.g. when a homemade video sequence has to be stabilized. This may require knowledge of the translation, and the rotation parameters. After calculating these parameters, the image as whole can be translated and rotated. This may lead to better results than handling the vectors individually.

Further, the motion vector field as such may not always be accurate and, therefore, finding motion model parameters according to embodiments could average out the errors, e.g. the deviations and/or the outliers. When the motion vector field is accurate, objects in the sequence may have different motion than the one of camera, which will result in a complex motion vector field. If the motion of the objects are small enough, then for the same reason as mentioned earlier, the motion of these objects can be averaged out. In general, the motion model parameters according to embodiments may represent the global motion.

From the projections, the total transformation parameters can be obtained. For example, according to embodiments, a displacement equation can be calculated with all projections of the vectors onto all axes. The matrices of the transformation equation have unknown elements, however, these elements can be obtained by means of a trigonometry equation. For instance, the multipliers, and mean values of the projections of the vector fields can be obtained from a curve fit method. For example, by calculating a line fit based on the least squared error of the distance to that line, or a polinominal fit method or an exponential fit method. This may allow calculating gain and off-set, i.e. scale/rotation and translation. Such an embodiment is an example optimized for complexity i.e. simple implementation and fast in execution. The output of the embodiment can be the off-set and gain.

According to other embodiments, these values can be obtained using the primitive function of the projections. The primitive functions can be according to embodiments, obtained using the Euler method.

With the primitive functions the area of the projection can be calculated, which is related to the multiplier. If the mean value or the translation parameter is disregarded, then the total area of the projection is related to the extreme of the primitive function. The extreme of the primitive function may lie on the point where its derivative function is zero. Once the extreme of the primitive function is found, the multiplier value may be calculated.

As the motion is often modeled by translation, scale, and rotation, and this motion is introduced most often by camera motion, the translation parameters represent, according to embodiments, a global model of camera motion.

A recursive method may also be possible, according to embodiments. A vector field based on the vector transformation parameters may be reconstructed and fed back to the initial motion estimation for calculating a vector field.

Another embodiment may provide calculating the transformation parameters using recursive calculation. Transformation parameters could be obtained using the embodiments as described above. Then, these parameters may be used to reconstruct the vector field. Within this reconstructed vector field, outliners may be identified in the original vector field. These outliners may be masked. With the masked outliners in the vector field, new vector transformation parameters may be calculated obtaining better results.

Another aspect of the invention is a computer program operable to cause a processor, when operated, to obtain transformation parameters by way of obtaining a vector field of motion vectors describing estimated motion vectors in an image, projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.

Another aspect of the invention is a computer program product with a computer program operable to cause a processor, when operated, to obtain transformation parameters by way of obtaining a vector field, projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.

Another aspect of the invention is a device arranged for obtaining transformation parameters, comprising estimation means arranged for obtaining a vector field, projecting means arranged for projecting the vector field on at least one axis, and calculation means, arranged for deriving the transformation parameters from the projection of the vector field.

Another aspect of the invention is to use of a method according to claim 1 in video compression.

These and other aspects of the invention will be apparent from and elucidated with reference to the following Figures.

In the Figure show:

FIG. 1 a flowchart of an inventive method according to embodiments;

FIG. 2 a device for providing the inventive method according to embodiments;

FIG. 3 a projection of vector x-components on the x-axis and the y-axis;

FIG. 4 a projection of vector y-components on the x-axis and the y-axis;

FIG. 5 an illustration of a scale transformation of a vector field;

FIG. 6 an illustration of a rotation transformation of a vector field;

FIG. 7 an illustration of a relation between gain and the projection function.

FIG. 1 illustrates a flowchart of a method for obtaining transformation parameters from video images.

The majority of pixel motion is caused by camera movements. Therefore, one approach to improve motion estimation is to provide a global motion model of the camera. This motion can be modeled by translation, scale and rotation values. Translation, scale and rotation can be described by mathematical models, which will be explained below. In the following, the variables are as follows:

v_(q)(bx,by): q-component of vector on position (bx, by) pv_(q)(r): projection of q-component of vectors as function of r bq: vector index in vector field N_(bq): Number of vectors in q direction q and r: is either x or y x: x-axis component of the vector field y: y-axis component of the vector field x′: transformed x-component of the vector field after motion estimation y′: transformed y-component of the vector field after motion estimation Θ: rotation angle s: scale parameter t: translation parameter

Assuming that the origin of the axis is in the center of an image frame, the translation can be described as

[x′y′=[xy]+└t _(x) t _(y) ┘=[xy]+T.

The scale transformation can be described as

$\left\lbrack {x^{\prime}y^{\prime}} \right\rbrack = {{\lbrack{xy}\rbrack \begin{bmatrix} s_{x} & 0 \\ 0 & s_{y} \end{bmatrix}}.}$

In particular in the field of video processing the scale parameter as may often be defined by the optical properties of the cameras and that the pixel aspect ratio is equal to 1. In this case, the scale parameter s can be a single parameter. Then, the above equation reduces to

[x′y′]=[xy]s.

Rotation of the camera can be described by

$\left\lbrack {x^{\prime}y^{\prime}} \right\rbrack = {{\lbrack{xy}\rbrack \begin{bmatrix} {\cos \; \Theta} & {\sin \; \Theta} \\ {{- \sin}\; \Theta} & {\cos \; \Theta} \end{bmatrix}} = {\lbrack{xy}\rbrack {{R(\Theta)}.}}}$

The overall transformation can be described by rotation, scale and translation according to the following equation.

[x′y′]=[xy]sR(Θ)+T.

In order to calculate the transformation parameters, a vector field of motion estimated vectors is necessary. Therefore, this vector field is calculated (100) according to commonly known methods. With this vector field, a projection of the x-component of the vector field on the x-axis (102) is carried out. This projection can be described as

${{pv}_{x}({bx})} = {\frac{1}{N_{by}}{\sum\limits_{by}^{N_{by}}{{v_{x}\left( {{bx},{by}} \right)}.}}}$

The x-component of the vector field can further be projected onto the y-axis (104), which projection can be described as

${{pv}_{x}({by})} = {\frac{1}{N_{bx}} = {\sum\limits_{{bx} = 1}^{N_{bx}}\; {{v_{x}\left( {{bx},{by}} \right)}.}}}$

The projection of x-components on the axes is illustrated in FIG. 3. Illustrated is a vector field 300 with estimated motion vectors V(x,y) 302. Each vector V(x,y) 302 can be divided into x-components 302 a and y-components 302 b. An image may be segmented into columns 304 and rows 306.

Each column 304 can be projected onto the x-axis. The average of the vector x-components of all vectors in each of the columns 304 is considered as the projection pv_(x)(colum). The projection over all columns results in the projection function pv_(x)(x) 308.

Each row 306 can be projected onto the y-axis. The average of the vector x-components of all vectors in each of the rows 306 is considered as the projection pv_(x)(row). The projection over all rows results in the projection function pv_(x)(y) 310.

The resulting projection functions pv_(x)(x) 308, and pv_(x)(y) 310 represent the average values of the x-components of the vectors in the motion estimated vector field 300.

Besides the x-components of the vector field, also the y-components of the vector field can be projected. The projection on the x-axis (106) can be described as

${{pv}_{y}({bx})} = {\frac{1}{N_{bv}} = {\sum\limits_{y = 1}^{N_{bv}}\; {v_{y}\left( {{bx},{by}} \right)}}}$

and the projection on the y-axis (108) can be described by

${{pv}_{y}({by})} = {\frac{1}{N_{bx}} = {\sum\limits_{x = 1}^{N_{bx}}\; {{v_{y}\left( {{bx},{by}} \right)}.}}}$

The projection of y-components on the axes is illustrated in FIG. 4. The same reference number refer to the same elements, e.g. 400 refers to 300, etc.

Illustrated is a vector field 400 with estimated motion vectors V(x,y) 402. Each vector V(x,y) 402 can be divided into x-components 402 a and y-components 402 b. An image may be segmented into columns 404 and rows 406.

Each column 404 can be projected onto the x-axis. The average of the vector y-components of all vectors in each of the columns 404 is considered as the projection pv_(y)(colum). The projection over all columns results in the projection function pv_(y)(x) 408.

Each row 406 can be projected onto the y-axis. The average of the vector y-components of all vectors in each of the rows 306 is considered as the projection pv_(y)(row). The projection over all rows results in the projection function pv_(y)(y) 410.

The resulting projection functions pv_(x)(x) 308, and pv_(y)(x) 310 represent the average values of the x-components of the vectors in the vector field 300.

When applying scale transformation and translation to the vector field, it can be rewritten as

└v _(x) v _(y) ┘=[x′y′]−[xy]

[v _(x) v _(y) ]=[xy](s−1)+T

The projection of the scaled and translated x-component on the x-axis can be described as

${{pv}_{x}(x)} = {\frac{1}{N_{y}} = {\sum\limits_{y = {- \frac{N_{y}}{2}}}^{\frac{N_{y}}{2}}\left( {{x\left( {s - 1} \right)} + t_{x}} \right)}}$ pv_(x)(x) = x(s − 1) + t_(x)

which is a first order function of x, where the scale parameter s is a multiplier and the translation t_(x) is equal to the mean value.

Further, the projection of the x-component of the vector field on the y-axis may reveal

${{pv}_{x}(y)} = {\frac{1}{N_{x}} = {\sum\limits_{x = {- \frac{N_{x}}{2}}}^{\frac{N_{x}}{2}}\left( {{x\left( {s - 1} \right)} + t_{x}} \right)}}$ pv_(x)(y) = t_(x)

, where the translation t_(x) is a constant. Further, the projection of the y-component of the vector field on the x-axis may reveal

${{pv}_{y}(x)} = {\frac{1}{N_{y}} = {\sum\limits_{y = {- \frac{N_{y}}{2}}}^{\frac{N_{y}}{2}}\left( {{y\left( {s - 1} \right)} + t_{y}} \right)}}$ pv_(y)(x) = t_(y)

, where the translation t_(y) is constant. Eventually, the projection of the y-component of the vector field onto the y-axis may reveal

${{pv}_{y}(y)} = {\frac{1}{N_{x}} = {\sum\limits_{x = {- \frac{N_{x}}{2}}}^{\frac{N_{x}}{2}}\left( {{y\left( {s - 1} \right)} + t_{y}} \right)}}$ pv_(y)(y) = y(s − 1) + t_(y)

, which is a first order function of y, where the scale parameter s is a multiplier and the translation t_(y) is equal to the mean value. The above equations show that the translation and scale parameters may be derived from the properties of the projections of the vector field on the axes. The gain/multiplier (tan φ) is related to the scale parameter or the rotation parameter, while the average value of the projection function may represent the translation.

Besides translation and scale transformation, camera rotation can as well be described. The displacement of the vector field resulting from rotation can be described by

└v _(x) v _(y) ┘=[x′y′]−[ xy]

[v_(x) v _(y) ]=[xy](R−I)+T

R relates to the rotation matrix, I an identity matrix and T the translation.

The projection of the x-component of the vector field on the x-axis can be described by

${{pv}_{x}(x)} = {\frac{1}{N_{y}} = {\sum\limits_{y = {- \frac{N_{y}}{2}}}^{\frac{N_{y}}{2}}\left( {{x\left( {{\cos \; \Theta} - 1} \right)} - {y\; \sin \; \Theta} + t_{x}} \right)}}$ pv_(x)(x) = x(cos  Θ − 1) + t_(x)

The projection of the x-component of the vector field on the y-axis can be described by

${{pv}_{x}(y)} = {\frac{1}{N_{x}} = {\sum\limits_{x = {- \frac{Nx}{2}}}^{\frac{N_{x}}{2}}\left( {{x\left( {{\cos \; \Theta} - 1} \right)} - {y\; \sin \; \Theta} + t_{x}} \right)}}$ pv_(x)(y) = y(cos  Θ − 1) + t_(x)

The projection of the y-component of the vector field on the x-axis can be described by

${{pv}_{y}(x)} = {\frac{1}{N_{y}} = {\sum\limits_{y = {- \frac{N_{y}}{2}}}^{\frac{N_{y}}{2}}\left( {{x\; \sin \; \Theta} + {y\left( {{\cos \; \Theta} - 1} \right)} + t_{y}} \right)}}$ pv_(y)(x) = x sin  Θ + t_(y)

and the projection of the y-component of the vector field on the y-axis can be described by

${pv}_{y} = {\frac{1}{N_{x}} = {{\sum\limits_{y = {- \frac{Nx}{2}}}^{\frac{N_{x}}{2}}{\left( {{x\; \sin \; \Theta} + {y\left( {{\cos \; \Theta} - 1} \right)} + t_{y}} \right){{pv}_{y}(y)}}} = {{y\left( {{\cos \mspace{11mu} \Theta} - 1} \right)} + t_{y}}}}$

From the above it is apparent that the rotation can be determined by means of the properties of the projection of the vector field. Each of the projections is comprised of a multiplier and the rotation angle as transformation parameter.

The overall transformation can be described by the following displacement equation

$\left\lfloor {v_{x}v_{y}} \right\rfloor = {{{\lbrack{xy}\rbrack \left( {{{sR}(\Theta)} - I} \right)} + {T\left\lbrack {v_{x}v_{y}} \right\rbrack}} = {{\lbrack{xy}\rbrack \begin{bmatrix} {{s\; \cos \; \Theta} - 1} & {s\; \sin \; \Theta} \\ {{- s}\; \sin \; \Theta} & {{s\; \cos \; \Theta} - 1} \end{bmatrix}} + T}}$

The elements of the transformation matrix s and θ can be declared as

$\begin{bmatrix} {{s\; \cos \; \Theta} - 1} & {s\; \sin \; \Theta} \\ {{- s}\; \sin \; \Theta} & {{s\; \cos \; \Theta} - 1} \end{bmatrix} = \begin{bmatrix} m_{1} & m_{2} \\ {- m_{2}} & m_{1} \end{bmatrix}$

Which parameters can be determined from the trigonometry equations

sin^(2 Θ+cos) ² Θ=1

m ₂ ²+(m ₁+1)² =s ²

After having calculated the projections of the vector components on the axis, the multiplier and mean values of the projections can be calculated (110) to obtain the transformation parameters.

The relevance of a scale translation to the projection functions is illustrated in FIG. 5. Illustrated is a vector field 500, which image is subjected to a scale translation through zooming. As can be seen from the projection function pv_(x)(x) of the x-components onto the x-axis, and the projection function pv_(y)(y) of the y-components onto the y-axis the scale factor s is in close relation to the angle φ of the projection function. The relation is tan φ=(s−1). The scaling has no effect on the projection function pv_(y)(x) of the y-components onto the x-axis, and the projection function pv_(x)(y) of the x-components onto the y-axis.

The relevance of rotation translation to the projection functions is illustrated in FIG. 6. Illustrated is a vector field 600, which image is subjected to a rotation translation by an angle θ. As can be seen from the rotation is in close relation to the angle φ₁ of the projection function pv_(x)(x) of the x-component on the x-axis and to the angle φ₂ of the projection function pv_(y)(x) of the y-component on the x-axis. Further, the rotation is in close relation to the angle φ₂ of the projection function pv_(x)(y) of the x-component on the y-axis and to the angle φ₁ of the projection function pv_(y)(y) of the y-component on the y-axis. The relation is tan φ₁=cos 0−1 and tan φ₂=sin 0.

These gain and multiplier values can be obtained by using the primitive function of the projections. With the primitive function, the area of the projection, which is related to the multiplier, can be determined. Disregarding the mean value or the translation parameter results in that the total area of the projection is related to the extreme of the primitive function.

Having subtracted the average values from the projection functions, the extreme points of the primitive functions can be obtained, which allow calculating the gain and multiplier. For example, FIG. 7 illustrates the relation between the projection function and the gain/multiplier. A projection function pv_(x)(x) of the x-components on the x-axis is illustrated 700. First, the average value t_(x) can be eliminated, as this value may represent a translation. The resulting function 702 may only represent the gain.

The area of the function 702 may be related to the gain. Integrating the function 702 using the Euler method with a recursive adder may result in the primitive function 704. The maximum of function 704 may be related to the gain.

Putting it into terms, for example, when considering only the x-component of the vector field projected on the x-axis results in

${{Pv}_{x}({bx})} = {\sum\limits_{i = {- \frac{N_{bx}}{2}}}^{bx}\left( {\left( {{{pv}_{x}(i)} - t_{x}} \right) \cdot {bs}_{x}} \right)}$ ${{Pv}_{x}({bx})} = {\sum\limits_{i = {- \frac{N_{bx}}{2}}}^{bx}\left( {m_{1}{i \cdot {bs}_{x}}} \right)}$

, where bs_(x) is the associate block size of the vectors. The extreme of the primitive function is on the point where its derivative function is zero. In this case, this is zero. At the point zero, the primitive function is

${{Pv}_{x}(0)} = {\sum\limits_{i = {- \frac{N_{bx}}{2}}}^{0}\left( {m_{1}{i \cdot {bs}_{x}}} \right)}$ ${{Pv}_{x}(0)} = {\frac{- \left( {\frac{N_{bx}}{2}\left( {\frac{N_{bx}}{2} + 1} \right)} \right)}{2}{m_{1} \cdot {bs}_{x}}}$

, which means that once the extreme of the primitive function is found, the multiplier can be calculated by means of the above equation. The projections on the other axes can be used to obtain all other values.

FIG. 2 illustrates a device for carrying out the calculation of the translation parameters. An input video signal is input at terminal 200. Within motion estimating circuit 202, the motion vectors are estimated. The motion vector estimation can be carried out on consecutive frames of the input video signal. For example, using three consecutive images allows determining the motion vector of pixels over three consecutive frames. With the estimated motion vectors, the motion estimator 202 outputs a vector field describing the motion of the pixels. This output is fed to projecting circuit 204. Projecting circuit 204 projects the components of the motion vectors onto the axes of the coordination system. The output of projecting circuit 204 are the values of the corresponding projections of the motion vectors on the respective axis. This projection is used within calculation circuit 206 to obtain the translation parameters. In calculation circuit 206, the multipliers and mean values of the projections of the vector fields are calculated. This may be done by using a polinominal fit method or a primitive function of the projection. This may be done using the Euler method. The output of calculation circuit 206 are transformation parameters for describing a motion model of camera motion.

The accuracy of the transformation model is depended on the accuracy of the vector field. It also depends on the consistency of the vector field. The accuracy of the transformation model decreases with objects in the frame that are moving otherwise than the camera movement.

The parameters are put out at output terminal 208. 

1. Method for obtaining transformation parameters from a vector field with projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.
 2. The method of claim 1, wherein the vector field is described by estimated motion vectors describing motion in an image.
 3. The method of claim 1, wherein the vector field comprises vectors with at least one first component and at least one second component, and wherein the first component is parallel to a first axis and wherein the second component is parallel to a second axis.
 4. The method of claim 3, wherein projecting at least one component on at least one axis isolates at least a scale parameter.
 5. The method of claim 4, wherein the scale parameter is calculated from at least one multiplier of the projection(s) on at least one axis.
 6. The method of claim 3, wherein projecting at least one component on at least one axis isolates at least a translation parameter.
 7. The method of claim 6, wherein the translation parameter is calculated from a mean value of the projection on one axis.
 8. The method of claim 3, wherein projecting at least one component on at least one axis isolates at least a rotation parameter.
 9. The method of claim 8, wherein the rotation parameter is calculated from at least one multiplier of the projection(s) on at least one axis.
 10. The method of claim 1, wherein the transformation parameters are obtained from a curve fit algorithm applied to the projections.
 11. The method of claim 1, wherein the transformation parameters are obtained from a primitive functions of the projections.
 12. The method of claim 11, wherein the primitive function is an Euler function.
 13. The method of claim 11, wherein at least one parameter is calculated from an extreme of the primitive function.
 14. The method of claim 1, wherein the translation parameters represent a global model of camera motion.
 15. A computer program operable to cause a processor, when operated, to obtain transformation parameters by way of obtaining a vector field, projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.
 16. A computer program product with a computer program operable to cause a processor, when operated, to obtain transformation parameters by way of obtaining a vector field, projecting the vector field on at least one axis, and deriving the transformation parameters from the projection of the vector field.
 17. Device arranged for obtaining transformation parameters, comprising: estimation means arranged for obtaining a vector field, projecting means arranged for projection the vector field on at least one axis, and calculation means, arranged for deriving the transformation parameters from the projection of the vector field.
 18. Use of a method according to claim 1 in video compression. 